/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : SystemLogicTask.h
  * @brief          : System Logic Task
  ******************************************************************************
  * @attention
  * 本文件用于  系统时间处理
  * @20210412:文件模板第一次生成
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __SYS_UTC_TIME_H
#define __SYS_UTC_TIME_H



/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "main.h"


/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/

/* USER CODE BEGIN ET */

typedef struct
{
	uint16_t onHours;
	uint16_t onMinutes;
	
	uint16_t offHours;
	uint16_t offMinutes;
	
}sSetTimeDef;


typedef struct
{
	uint8_t Hours;
  uint8_t Minutes;
  uint8_t Seconds;
  uint8_t WeekDay;
  uint8_t Month;
  uint8_t Date;
  uint16_t Year;
	
}DateTimeDef;

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */







/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

extern 		uint8_t		tTimeSart;
extern		volatile	uint32_t			SysTimeUnix;
extern 		volatile 	uint32_t			SysRunTimeSec;

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/






/* USER CODE BEGIN EFP */

extern 		uint32_t TimeToUnix(uint16_t Hours,uint16_t Minutes);

extern 		void UnixToDateTime(uint32_t unix,DateTimeDef *sDateTime);

extern 		uint32_t DateTimeToUnix(DateTimeDef *sDateTime);

/* USER CODE END EFP */



#endif /* __DO_TASK_H */

/************************ (C) COPYRIGHT CunJu *****END OF FILE****/
